﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace CSObjectWrap
{
    public class LuaTestObjWrap
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			Utils.BeginObjectRegister(typeof(LuaTestObj), L, translator, 8, 7, 3, 3);
			Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__add", __AddMeta);
            Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__sub", __SubMeta);
            Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__mul", __MulMeta);
            Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__div", __DivMeta);
            Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__mod", __ModMeta);
            Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__unm", __UnmMeta);
            Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__lt", __LTMeta);
            Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__le", __LEMeta);
            
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "CallEvent", CallEvent);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Sum", Sum);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPtr", GetPtr);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "PrintPtr", PrintPtr);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "VariableParamFuncDefault", VariableParamFuncDefault);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "TestEvent1", TestEvent1);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "TestEvent2", TestEvent2);
			
			Utils.RegisterFunc(L, Utils.GETTER_IDX, "testVar", get_testVar);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "testArr", get_testArr);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "ptr", get_ptr);
            
			Utils.RegisterFunc(L, Utils.SETTER_IDX, "testVar", set_testVar);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "testArr", set_testArr);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "ptr", set_ptr);
            
			Utils.EndObjectRegister(typeof(LuaTestObj), L, translator, __CSIndexer, __NewIndexer,
			    null, null, null);

		    Utils.BeginClassRegister(typeof(LuaTestObj), L, __CreateInstance, 44, 20, 20);
			Utils.RegisterFunc(L, Utils.CLS_IDX, "CallStaticEvent", CallStaticEvent_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "DefaultParaFuncSingle", DefaultParaFuncSingle_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "DefaultParaFuncMulti", DefaultParaFuncMulti_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "VariableParamFunc", VariableParamFunc_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "TestEnumFunc", TestEnumFunc_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "TestGetType", TestGetType_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "Gen64BitInt", Gen64BitInt_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "CreateTestLuaObj", CreateTestLuaObj_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "CalcAdd", CalcAdd_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "calcadd", calcadd_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "CalcDel", CalcDel_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "CalcMul", CalcMul_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "GenDelegate", GenDelegate_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OverLoad1", OverLoad1_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OverLoad2", OverLoad2_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OverLoad3", OverLoad3_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc1", OutRefFunc1_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc2", OutRefFunc2_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc3", OutRefFunc3_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc4", OutRefFunc4_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc5", OutRefFunc5_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc6", OutRefFunc6_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc11", OutRefFunc11_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc12", OutRefFunc12_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc13", OutRefFunc13_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc14", OutRefFunc14_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc15", OutRefFunc15_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc16", OutRefFunc16_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc21", OutRefFunc21_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc22", OutRefFunc22_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc23", OutRefFunc23_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc24", OutRefFunc24_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc25", OutRefFunc25_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "OutRefFunc26", OutRefFunc26_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "Sum", Sum_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "StaticVariableParamFuncDefault", StaticVariableParamFuncDefault_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "FuncReturnByteArray", FuncReturnByteArray_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "FuncReturnByte", FuncReturnByte_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "FuncReturnIntArray", FuncReturnIntArray_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "FuncReturnInt", FuncReturnInt_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "TestImplicit", TestImplicit_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "FirstPushEnumFunc", FirstPushEnumFunc_xlua_st_);
            
			Utils.RegisterFunc(L, Utils.CLS_IDX, "TestStaticEvent1", TestStaticEvent1);
			
            
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UnderlyingSystemType", typeof(LuaTestObj));
			Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "luaEnv", get_luaEnv);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "ulX1", get_ulX1);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "ulX2", get_ulX2);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "lY1", get_lY1);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "lY2", get_lY2);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "i64Z1", get_i64Z1);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "i64Z2", get_i64Z2);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "lY3", get_lY3);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "lY4", get_lY4);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "lY5", get_lY5);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "lY6", get_lY6);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "csDelegate", get_csDelegate);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "csDelegate1", get_csDelegate1);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "csDelegate2", get_csDelegate2);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "csDelegate3", get_csDelegate3);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "csDelegate4", get_csDelegate4);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "csDelegate11", get_csDelegate11);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "csDelegate12", get_csDelegate12);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "csDelegate13", get_csDelegate13);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "initNumber", get_initNumber);
            
			Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "luaEnv", set_luaEnv);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "ulX1", set_ulX1);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "ulX2", set_ulX2);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "lY1", set_lY1);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "lY2", set_lY2);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "i64Z1", set_i64Z1);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "i64Z2", set_i64Z2);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "lY3", set_lY3);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "lY4", set_lY4);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "lY5", set_lY5);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "lY6", set_lY6);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "csDelegate", set_csDelegate);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "csDelegate1", set_csDelegate1);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "csDelegate2", set_csDelegate2);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "csDelegate3", set_csDelegate3);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "csDelegate4", set_csDelegate4);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "csDelegate11", set_csDelegate11);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "csDelegate12", set_csDelegate12);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "csDelegate13", set_csDelegate13);
            Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "initNumber", set_initNumber);
            
			Utils.EndClassRegister(typeof(LuaTestObj), L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			try {
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					LuaTestObj __cl_gen_ret = new LuaTestObj();
					translator.Push(L, __cl_gen_ret);
					return 1;
				}
				
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            return LuaAPI.luaL_error(L, "invalid arguments to LuaTestObj constructor!");
            
        }
        
		
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        public static int __CSIndexer(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			try {
				
				if (translator.Assignable<LuaTestObj>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
				{
					
					LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
					int index = LuaAPI.xlua_tointeger(L, 2);
					LuaAPI.lua_pushboolean(L, true);
					LuaAPI.xlua_pushinteger(L, __cl_gen_to_be_invoked[index]);
					return 2;
				}
				
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
			
            LuaAPI.lua_pushboolean(L, false);
			return 1;
        }
		
        
		
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        public static int __NewIndexer(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
			try {
				
				if (translator.Assignable<LuaTestObj>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3))
				{
					
					LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
					int key = LuaAPI.xlua_tointeger(L, 2);
					__cl_gen_to_be_invoked[key] = LuaAPI.xlua_tointeger(L, 3);
					LuaAPI.lua_pushboolean(L, true);
					return 1;
				}
				
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
			
			LuaAPI.lua_pushboolean(L, false);
            return 1;
        }
		
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __AddMeta(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
			try {
				if (translator.Assignable<LuaTestObj>(L, 1) && translator.Assignable<LuaTestObj>(L, 2))
				{
					LuaTestObj leftside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
					LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 2, typeof(LuaTestObj));
					
					translator.Push(L, leftside + rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
			try {
				if (translator.Assignable<LuaTestObj>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
				{
					LuaTestObj leftside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
					int rightside = LuaAPI.xlua_tointeger(L, 2);
					
					translator.Push(L, leftside + rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
			try {
				if (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && translator.Assignable<LuaTestObj>(L, 2))
				{
					int leftside = LuaAPI.xlua_tointeger(L, 1);
					LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 2, typeof(LuaTestObj));
					
					translator.Push(L, leftside + rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
            return LuaAPI.luaL_error(L, "invalid arguments to right hand of + operator, need LuaTestObj!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __SubMeta(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
			try {
				if (translator.Assignable<LuaTestObj>(L, 1) && translator.Assignable<LuaTestObj>(L, 2))
				{
					LuaTestObj leftside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
					LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 2, typeof(LuaTestObj));
					
					translator.Push(L, leftside - rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
			try {
				if (translator.Assignable<LuaTestObj>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
				{
					LuaTestObj leftside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
					int rightside = LuaAPI.xlua_tointeger(L, 2);
					
					translator.Push(L, leftside - rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
			try {
				if (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && translator.Assignable<LuaTestObj>(L, 2))
				{
					int leftside = LuaAPI.xlua_tointeger(L, 1);
					LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 2, typeof(LuaTestObj));
					
					translator.Push(L, leftside - rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
            return LuaAPI.luaL_error(L, "invalid arguments to right hand of - operator, need LuaTestObj!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __MulMeta(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
			try {
				if (translator.Assignable<LuaTestObj>(L, 1) && translator.Assignable<LuaTestObj>(L, 2))
				{
					LuaTestObj leftside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
					LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 2, typeof(LuaTestObj));
					
					translator.Push(L, leftside * rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
			try {
				if (translator.Assignable<LuaTestObj>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
				{
					LuaTestObj leftside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
					int rightside = LuaAPI.xlua_tointeger(L, 2);
					
					translator.Push(L, leftside * rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
			try {
				if (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && translator.Assignable<LuaTestObj>(L, 2))
				{
					int leftside = LuaAPI.xlua_tointeger(L, 1);
					LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 2, typeof(LuaTestObj));
					
					translator.Push(L, leftside * rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
            return LuaAPI.luaL_error(L, "invalid arguments to right hand of * operator, need LuaTestObj!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __DivMeta(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
			try {
				if (translator.Assignable<LuaTestObj>(L, 1) && translator.Assignable<LuaTestObj>(L, 2))
				{
					LuaTestObj leftside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
					LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 2, typeof(LuaTestObj));
					
					translator.Push(L, leftside / rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
			try {
				if (translator.Assignable<LuaTestObj>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
				{
					LuaTestObj leftside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
					int rightside = LuaAPI.xlua_tointeger(L, 2);
					
					translator.Push(L, leftside / rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
			try {
				if (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && translator.Assignable<LuaTestObj>(L, 2))
				{
					int leftside = LuaAPI.xlua_tointeger(L, 1);
					LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 2, typeof(LuaTestObj));
					
					translator.Push(L, leftside / rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
            return LuaAPI.luaL_error(L, "invalid arguments to right hand of / operator, need LuaTestObj!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __ModMeta(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
			try {
				if (translator.Assignable<LuaTestObj>(L, 1) && translator.Assignable<LuaTestObj>(L, 2))
				{
					LuaTestObj leftside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
					LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 2, typeof(LuaTestObj));
					
					translator.Push(L, leftside % rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
			try {
				if (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && translator.Assignable<LuaTestObj>(L, 2))
				{
					int leftside = LuaAPI.xlua_tointeger(L, 1);
					LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 2, typeof(LuaTestObj));
					
					translator.Push(L, leftside % rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
			try {
				if (translator.Assignable<LuaTestObj>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
				{
					LuaTestObj leftside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
					int rightside = LuaAPI.xlua_tointeger(L, 2);
					
					translator.Push(L, leftside % rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
            return LuaAPI.luaL_error(L, "invalid arguments to right hand of % operator, need LuaTestObj!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __UnmMeta(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            try {
                LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
                translator.Push(L, - rightside);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __LTMeta(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
			try {
				if (translator.Assignable<LuaTestObj>(L, 1) && translator.Assignable<LuaTestObj>(L, 2))
				{
					LuaTestObj leftside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
					LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 2, typeof(LuaTestObj));
					
					LuaAPI.lua_pushboolean(L, leftside < rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
            return LuaAPI.luaL_error(L, "invalid arguments to right hand of < operator, need LuaTestObj!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __LEMeta(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
			try {
				if (translator.Assignable<LuaTestObj>(L, 1) && translator.Assignable<LuaTestObj>(L, 2))
				{
					LuaTestObj leftside = (LuaTestObj)translator.GetObject(L, 1, typeof(LuaTestObj));
					LuaTestObj rightside = (LuaTestObj)translator.GetObject(L, 2, typeof(LuaTestObj));
					
					LuaAPI.lua_pushboolean(L, leftside <= rightside);
					
					return 1;
				}
			}
			catch(System.Exception __gen_e) {
				return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
			}
            
            return LuaAPI.luaL_error(L, "invalid arguments to right hand of <= operator, need LuaTestObj!");
            
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int CallEvent(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
            
            
            try {
                
                {
                    float y = (float)LuaAPI.lua_tonumber(L, 2);
                    
                        int __cl_gen_ret = __cl_gen_to_be_invoked.CallEvent( y );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int CallStaticEvent_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    float y = (float)LuaAPI.lua_tonumber(L, 1);
                    
                        int __cl_gen_ret = LuaTestObj.CallStaticEvent( y );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int DefaultParaFuncSingle_xlua_st_(RealStatePtr L)
        {
            
            
            
			int __gen_param_count = LuaAPI.lua_gettop(L);
            
            try {
                if(__gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) 
                {
                    int i = LuaAPI.xlua_tointeger(L, 1);
                    string str = LuaAPI.lua_tostring(L, 2);
                    
                        int __cl_gen_ret = LuaTestObj.DefaultParaFuncSingle( i, str );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) 
                {
                    int i = LuaAPI.xlua_tointeger(L, 1);
                    
                        int __cl_gen_ret = LuaTestObj.DefaultParaFuncSingle( i );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to LuaTestObj.DefaultParaFuncSingle!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int DefaultParaFuncMulti_xlua_st_(RealStatePtr L)
        {
            
            
            
			int __gen_param_count = LuaAPI.lua_gettop(L);
            
            try {
                if(__gen_param_count == 4&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) 
                {
                    int i = LuaAPI.xlua_tointeger(L, 1);
                    string str = LuaAPI.lua_tostring(L, 2);
                    double d = LuaAPI.lua_tonumber(L, 3);
                    byte c = (byte)LuaAPI.lua_tonumber(L, 4);
                    
                        int __cl_gen_ret = LuaTestObj.DefaultParaFuncMulti( i, str, d, c );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) 
                {
                    int i = LuaAPI.xlua_tointeger(L, 1);
                    string str = LuaAPI.lua_tostring(L, 2);
                    double d = LuaAPI.lua_tonumber(L, 3);
                    
                        int __cl_gen_ret = LuaTestObj.DefaultParaFuncMulti( i, str, d );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) 
                {
                    int i = LuaAPI.xlua_tointeger(L, 1);
                    string str = LuaAPI.lua_tostring(L, 2);
                    
                        int __cl_gen_ret = LuaTestObj.DefaultParaFuncMulti( i, str );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) 
                {
                    int i = LuaAPI.xlua_tointeger(L, 1);
                    
                        int __cl_gen_ret = LuaTestObj.DefaultParaFuncMulti( i );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to LuaTestObj.DefaultParaFuncMulti!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int VariableParamFunc_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
			int __gen_param_count = LuaAPI.lua_gettop(L);
            
            try {
                if(__gen_param_count >= 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 2) || (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING))) 
                {
                    int i = LuaAPI.xlua_tointeger(L, 1);
                    string[] strs = translator.GetParams<string>(L, 2);
                    
                        int __cl_gen_ret = LuaTestObj.VariableParamFunc( i, strs );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count >= 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 2) || LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))) 
                {
                    int i = LuaAPI.xlua_tointeger(L, 1);
                    int[] strs = translator.GetParams<int>(L, 2);
                    
                        int __cl_gen_ret = LuaTestObj.VariableParamFunc( i, strs );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to LuaTestObj.VariableParamFunc!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int TestEnumFunc_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    LuaTestType x;translator.Get(L, 1, out x);
                    
                        int __cl_gen_ret = LuaTestObj.TestEnumFunc( x );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int TestGetType_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    System.Type x = (System.Type)translator.GetObject(L, 1, typeof(System.Type));
                    
                        string __cl_gen_ret = LuaTestObj.TestGetType( x );
                        LuaAPI.lua_pushstring(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int Gen64BitInt_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    
                    LuaTestObj.Gen64BitInt(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int CreateTestLuaObj_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    
                        ITestLuaClass __cl_gen_ret = LuaTestObj.CreateTestLuaObj(  );
                        translator.Push(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int CalcAdd_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    
                        int __cl_gen_ret = LuaTestObj.CalcAdd( x );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int calcadd_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    
                        int __cl_gen_ret = LuaTestObj.calcadd( x );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int CalcDel_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    
                        int __cl_gen_ret = LuaTestObj.CalcDel( x );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int CalcMul_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    
                        int __cl_gen_ret = LuaTestObj.CalcMul( x );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int GenDelegate_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    
                    LuaTestObj.GenDelegate(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OverLoad1_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
			int __gen_param_count = LuaAPI.lua_gettop(L);
            
            try {
                if(__gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) 
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    
                        int __cl_gen_ret = LuaTestObj.OverLoad1( x );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) 
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    int y = LuaAPI.xlua_tointeger(L, 2);
                    
                        int __cl_gen_ret = LuaTestObj.OverLoad1( x, y );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count >= 0&& (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 1) || LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1))) 
                {
                    int[] vars = translator.GetParams<int>(L, 1);
                    
                        int __cl_gen_ret = LuaTestObj.OverLoad1( vars );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to LuaTestObj.OverLoad1!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OverLoad2_xlua_st_(RealStatePtr L)
        {
            
            
            
			int __gen_param_count = LuaAPI.lua_gettop(L);
            
            try {
                if(__gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) 
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    float y = (float)LuaAPI.lua_tonumber(L, 2);
                    
                        int __cl_gen_ret = LuaTestObj.OverLoad2( x, y );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count == 2&& (LuaAPI.lua_isnil(L, 1) || LuaAPI.lua_type(L, 1) == LuaTypes.LUA_TSTRING)&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) 
                {
                    string x = LuaAPI.lua_tostring(L, 1);
                    string y = LuaAPI.lua_tostring(L, 2);
                    
                        int __cl_gen_ret = LuaTestObj.OverLoad2( x, y );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to LuaTestObj.OverLoad2!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OverLoad3_xlua_st_(RealStatePtr L)
        {
            
            
            
			int __gen_param_count = LuaAPI.lua_gettop(L);
            
            try {
                if(__gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) 
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    
                        int __cl_gen_ret = LuaTestObj.OverLoad3( x );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count == 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) 
                {
                    short y = (short)LuaAPI.xlua_tointeger(L, 1);
                    
                        int __cl_gen_ret = LuaTestObj.OverLoad3( y );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to LuaTestObj.OverLoad3!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc1_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    int y;
                    int z = LuaAPI.xlua_tointeger(L, 2);
                    
                    LuaTestObj.OutRefFunc1( x, out y, ref z );
                    LuaAPI.xlua_pushinteger(L, y);
                        
                    LuaAPI.xlua_pushinteger(L, z);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc2_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    int y = LuaAPI.xlua_tointeger(L, 2);
                    int z;
                    
                    LuaTestObj.OutRefFunc2( ref x, y, out z );
                    LuaAPI.xlua_pushinteger(L, x);
                        
                    LuaAPI.xlua_pushinteger(L, z);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc3_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    int y;
                    int z = LuaAPI.xlua_tointeger(L, 2);
                    
                    LuaTestObj.OutRefFunc3( x, out y, ref z );
                    LuaAPI.xlua_pushinteger(L, y);
                        
                    LuaAPI.xlua_pushinteger(L, z);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc4_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    int y;
                    int z = LuaAPI.xlua_tointeger(L, 2);
                    
                        int __cl_gen_ret = LuaTestObj.OutRefFunc4( x, out y, ref z );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    LuaAPI.xlua_pushinteger(L, y);
                        
                    LuaAPI.xlua_pushinteger(L, z);
                        
                    
                    
                    
                    return 3;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc5_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    int y = LuaAPI.xlua_tointeger(L, 2);
                    int z;
                    
                        int __cl_gen_ret = LuaTestObj.OutRefFunc5( ref x, y, out z );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    LuaAPI.xlua_pushinteger(L, x);
                        
                    LuaAPI.xlua_pushinteger(L, z);
                        
                    
                    
                    
                    return 3;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc6_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    int x = LuaAPI.xlua_tointeger(L, 1);
                    int y = LuaAPI.xlua_tointeger(L, 2);
                    
                        int __cl_gen_ret = LuaTestObj.OutRefFunc6( x, y );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc11_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    ITestLuaClass x = (ITestLuaClass)translator.GetObject(L, 1, typeof(ITestLuaClass));
                    ITestLuaClass y;
                    ITestLuaClass z = (ITestLuaClass)translator.GetObject(L, 2, typeof(ITestLuaClass));
                    
                    LuaTestObj.OutRefFunc11( x, out y, ref z );
                    translator.Push(L, y);
                        
                    translator.Push(L, z);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc12_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    ITestLuaClass x = (ITestLuaClass)translator.GetObject(L, 1, typeof(ITestLuaClass));
                    ITestLuaClass y = (ITestLuaClass)translator.GetObject(L, 2, typeof(ITestLuaClass));
                    ITestLuaClass z;
                    
                    LuaTestObj.OutRefFunc12( ref x, y, out z );
                    translator.Push(L, x);
                        
                    translator.Push(L, z);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc13_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    ITestLuaClass x = (ITestLuaClass)translator.GetObject(L, 1, typeof(ITestLuaClass));
                    ITestLuaClass y;
                    ITestLuaClass z = (ITestLuaClass)translator.GetObject(L, 2, typeof(ITestLuaClass));
                    
                    LuaTestObj.OutRefFunc13( x, out y, ref z );
                    translator.Push(L, y);
                        
                    translator.Push(L, z);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc14_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    ITestLuaClass x = (ITestLuaClass)translator.GetObject(L, 1, typeof(ITestLuaClass));
                    ITestLuaClass y;
                    ITestLuaClass z = (ITestLuaClass)translator.GetObject(L, 2, typeof(ITestLuaClass));
                    
                        int __cl_gen_ret = LuaTestObj.OutRefFunc14( x, out y, ref z );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    translator.Push(L, y);
                        
                    translator.Push(L, z);
                        
                    
                    
                    
                    return 3;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc15_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    ITestLuaClass x = (ITestLuaClass)translator.GetObject(L, 1, typeof(ITestLuaClass));
                    ITestLuaClass y = (ITestLuaClass)translator.GetObject(L, 2, typeof(ITestLuaClass));
                    ITestLuaClass z;
                    
                        int __cl_gen_ret = LuaTestObj.OutRefFunc15( ref x, y, out z );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    translator.Push(L, x);
                        
                    translator.Push(L, z);
                        
                    
                    
                    
                    return 3;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc16_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    ITestLuaClass x = (ITestLuaClass)translator.GetObject(L, 1, typeof(ITestLuaClass));
                    ITestLuaClass y = (ITestLuaClass)translator.GetObject(L, 2, typeof(ITestLuaClass));
                    
                        int __cl_gen_ret = LuaTestObj.OutRefFunc16( x, y );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc21_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    TestDelegate x = translator.GetDelegate<TestDelegate>(L, 1);
                    TestDelegate y;
                    TestDelegate z = translator.GetDelegate<TestDelegate>(L, 2);
                    
                    LuaTestObj.OutRefFunc21( x, out y, ref z );
                    translator.Push(L, y);
                        
                    translator.Push(L, z);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc22_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    TestDelegate x = translator.GetDelegate<TestDelegate>(L, 1);
                    TestDelegate y = translator.GetDelegate<TestDelegate>(L, 2);
                    TestDelegate z;
                    
                    LuaTestObj.OutRefFunc22( ref x, y, out z );
                    translator.Push(L, x);
                        
                    translator.Push(L, z);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc23_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    TestDelegate x = translator.GetDelegate<TestDelegate>(L, 1);
                    TestDelegate y;
                    TestDelegate z = translator.GetDelegate<TestDelegate>(L, 2);
                    
                    LuaTestObj.OutRefFunc23( x, out y, ref z );
                    translator.Push(L, y);
                        
                    translator.Push(L, z);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc24_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    TestDelegate x = translator.GetDelegate<TestDelegate>(L, 1);
                    TestDelegate y;
                    TestDelegate z = translator.GetDelegate<TestDelegate>(L, 2);
                    
                        int __cl_gen_ret = LuaTestObj.OutRefFunc24( x, out y, ref z );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    translator.Push(L, y);
                        
                    translator.Push(L, z);
                        
                    
                    
                    
                    return 3;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc25_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    TestDelegate x = translator.GetDelegate<TestDelegate>(L, 1);
                    TestDelegate y = translator.GetDelegate<TestDelegate>(L, 2);
                    TestDelegate z;
                    
                        int __cl_gen_ret = LuaTestObj.OutRefFunc25( ref x, y, out z );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    translator.Push(L, x);
                        
                    translator.Push(L, z);
                        
                    
                    
                    
                    return 3;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int OutRefFunc26_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    TestDelegate x = translator.GetDelegate<TestDelegate>(L, 1);
                    TestDelegate y = translator.GetDelegate<TestDelegate>(L, 2);
                    
                        int __cl_gen_ret = LuaTestObj.OutRefFunc26( x, y );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int Sum(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
            
            
            try {
                
                {
                    int a = LuaAPI.xlua_tointeger(L, 2);
                    int b = LuaAPI.xlua_tointeger(L, 3);
                    int c = LuaAPI.xlua_tointeger(L, 4);
                    
                        int __cl_gen_ret = __cl_gen_to_be_invoked.Sum( a, b, c );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int Sum_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    int a = LuaAPI.xlua_tointeger(L, 1);
                    int b = LuaAPI.xlua_tointeger(L, 2);
                    
                        int __cl_gen_ret = LuaTestObj.Sum( a, b );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int GetPtr(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
            
            
            try {
                
                {
                    
                        System.IntPtr __cl_gen_ret = __cl_gen_to_be_invoked.GetPtr(  );
                        LuaAPI.lua_pushlightuserdata(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int PrintPtr(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
            
            
            try {
                
                {
                    System.IntPtr p = LuaAPI.lua_touserdata(L, 2);
                    
                        byte __cl_gen_ret = __cl_gen_to_be_invoked.PrintPtr( p );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int VariableParamFuncDefault(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
            
            
			int __gen_param_count = LuaAPI.lua_gettop(L);
            
            try {
                if(__gen_param_count >= 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)&& (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 4) || (LuaAPI.lua_isnil(L, 4) || LuaAPI.lua_type(L, 4) == LuaTypes.LUA_TSTRING))) 
                {
                    int d = LuaAPI.xlua_tointeger(L, 2);
                    int i = LuaAPI.xlua_tointeger(L, 3);
                    string[] strs = translator.GetParams<string>(L, 4);
                    
                        int __cl_gen_ret = __cl_gen_to_be_invoked.VariableParamFuncDefault( d, i, strs );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count >= 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) 
                {
                    int d = LuaAPI.xlua_tointeger(L, 2);
                    int i = LuaAPI.xlua_tointeger(L, 3);
                    
                        int __cl_gen_ret = __cl_gen_to_be_invoked.VariableParamFuncDefault( d, i );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count >= 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) 
                {
                    int d = LuaAPI.xlua_tointeger(L, 2);
                    
                        int __cl_gen_ret = __cl_gen_to_be_invoked.VariableParamFuncDefault( d );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to LuaTestObj.VariableParamFuncDefault!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int StaticVariableParamFuncDefault_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
			int __gen_param_count = LuaAPI.lua_gettop(L);
            
            try {
                if(__gen_param_count >= 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& (LuaTypes.LUA_TNONE == LuaAPI.lua_type(L, 3) || (LuaAPI.lua_isnil(L, 3) || LuaAPI.lua_type(L, 3) == LuaTypes.LUA_TSTRING))) 
                {
                    double d = LuaAPI.lua_tonumber(L, 1);
                    double i = LuaAPI.lua_tonumber(L, 2);
                    string[] strs = translator.GetParams<string>(L, 3);
                    
                        double __cl_gen_ret = LuaTestObj.StaticVariableParamFuncDefault( d, i, strs );
                        LuaAPI.lua_pushnumber(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count >= 1&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) 
                {
                    double d = LuaAPI.lua_tonumber(L, 1);
                    double i = LuaAPI.lua_tonumber(L, 2);
                    
                        double __cl_gen_ret = LuaTestObj.StaticVariableParamFuncDefault( d, i );
                        LuaAPI.lua_pushnumber(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                if(__gen_param_count >= 0&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1)) 
                {
                    double d = LuaAPI.lua_tonumber(L, 1);
                    
                        double __cl_gen_ret = LuaTestObj.StaticVariableParamFuncDefault( d );
                        LuaAPI.lua_pushnumber(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to LuaTestObj.StaticVariableParamFuncDefault!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int FuncReturnByteArray_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    
                        byte[] __cl_gen_ret = LuaTestObj.FuncReturnByteArray(  );
                        LuaAPI.lua_pushstring(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int FuncReturnByte_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    
                        byte __cl_gen_ret = LuaTestObj.FuncReturnByte(  );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int FuncReturnIntArray_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    
                        int[] __cl_gen_ret = LuaTestObj.FuncReturnIntArray(  );
                        translator.Push(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int FuncReturnInt_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    
                        int __cl_gen_ret = LuaTestObj.FuncReturnInt(  );
                        LuaAPI.xlua_pushinteger(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int TestImplicit_xlua_st_(RealStatePtr L)
        {
            
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
            try {
                
                {
                    
                        UnityEngine.LayerMask __cl_gen_ret = LuaTestObj.TestImplicit(  );
                        translator.Push(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int FirstPushEnumFunc_xlua_st_(RealStatePtr L)
        {
            
            
            
            try {
                
                {
                    int i = LuaAPI.xlua_tointeger(L, 1);
                    
                        string __cl_gen_ret = LuaTestObj.FirstPushEnumFunc( i );
                        LuaAPI.lua_pushstring(L, __cl_gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_testVar(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			
                LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, __cl_gen_to_be_invoked.testVar);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_luaEnv(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    translator.Push(L, LuaTestObj.luaEnv);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_testArr(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			
                LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
                translator.Push(L, __cl_gen_to_be_invoked.testArr);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_ulX1(RealStatePtr L)
        {
            
            try {
			    LuaAPI.lua_pushuint64(L, LuaTestObj.ulX1);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_ulX2(RealStatePtr L)
        {
            
            try {
			    LuaAPI.lua_pushuint64(L, LuaTestObj.ulX2);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_lY1(RealStatePtr L)
        {
            
            try {
			    LuaAPI.lua_pushint64(L, LuaTestObj.lY1);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_lY2(RealStatePtr L)
        {
            
            try {
			    LuaAPI.lua_pushint64(L, LuaTestObj.lY2);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_i64Z1(RealStatePtr L)
        {
            
            try {
			    LuaAPI.lua_pushint64(L, LuaTestObj.i64Z1);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_i64Z2(RealStatePtr L)
        {
            
            try {
			    LuaAPI.lua_pushint64(L, LuaTestObj.i64Z2);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_lY3(RealStatePtr L)
        {
            
            try {
			    LuaAPI.lua_pushint64(L, LuaTestObj.lY3);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_lY4(RealStatePtr L)
        {
            
            try {
			    LuaAPI.lua_pushint64(L, LuaTestObj.lY4);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_lY5(RealStatePtr L)
        {
            
            try {
			    LuaAPI.lua_pushint64(L, LuaTestObj.lY5);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_lY6(RealStatePtr L)
        {
            
            try {
			    LuaAPI.lua_pushint64(L, LuaTestObj.lY6);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_csDelegate(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    translator.Push(L, LuaTestObj.csDelegate);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_csDelegate1(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    translator.Push(L, LuaTestObj.csDelegate1);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_csDelegate2(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    translator.Push(L, LuaTestObj.csDelegate2);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_csDelegate3(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    translator.Push(L, LuaTestObj.csDelegate3);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_csDelegate4(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    translator.Push(L, LuaTestObj.csDelegate4);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_csDelegate11(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    translator.Push(L, LuaTestObj.csDelegate11);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_csDelegate12(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    translator.Push(L, LuaTestObj.csDelegate12);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_csDelegate13(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    translator.Push(L, LuaTestObj.csDelegate13);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_initNumber(RealStatePtr L)
        {
            
            try {
			    LuaAPI.xlua_pushinteger(L, LuaTestObj.initNumber);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int get_ptr(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			
                LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushlightuserdata(L, __cl_gen_to_be_invoked.ptr);
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_testVar(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			
                LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.testVar = LuaAPI.xlua_tointeger(L, 2);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_luaEnv(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    LuaTestObj.luaEnv = (XLua.LuaEnv)translator.GetObject(L, 1, typeof(XLua.LuaEnv));
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_testArr(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			
                LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.testArr = (int[])translator.GetObject(L, 2, typeof(int[]));
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_ulX1(RealStatePtr L)
        {
            
            try {
			    LuaTestObj.ulX1 = LuaAPI.lua_touint64(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_ulX2(RealStatePtr L)
        {
            
            try {
			    LuaTestObj.ulX2 = LuaAPI.lua_touint64(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_lY1(RealStatePtr L)
        {
            
            try {
			    LuaTestObj.lY1 = LuaAPI.lua_toint64(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_lY2(RealStatePtr L)
        {
            
            try {
			    LuaTestObj.lY2 = LuaAPI.lua_toint64(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_i64Z1(RealStatePtr L)
        {
            
            try {
			    LuaTestObj.i64Z1 = LuaAPI.lua_toint64(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_i64Z2(RealStatePtr L)
        {
            
            try {
			    LuaTestObj.i64Z2 = LuaAPI.lua_toint64(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_lY3(RealStatePtr L)
        {
            
            try {
			    LuaTestObj.lY3 = LuaAPI.lua_toint64(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_lY4(RealStatePtr L)
        {
            
            try {
			    LuaTestObj.lY4 = LuaAPI.lua_toint64(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_lY5(RealStatePtr L)
        {
            
            try {
			    LuaTestObj.lY5 = LuaAPI.lua_toint64(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_lY6(RealStatePtr L)
        {
            
            try {
			    LuaTestObj.lY6 = LuaAPI.lua_toint64(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_csDelegate(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    LuaTestObj.csDelegate = translator.GetDelegate<TestDelegate>(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_csDelegate1(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    LuaTestObj.csDelegate1 = translator.GetDelegate<TestDelegate>(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_csDelegate2(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    LuaTestObj.csDelegate2 = translator.GetDelegate<TestDelegate>(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_csDelegate3(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    LuaTestObj.csDelegate3 = translator.GetDelegate<TestDelegate>(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_csDelegate4(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    LuaTestObj.csDelegate4 = translator.GetDelegate<TestDelegate>(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_csDelegate11(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    LuaTestObj.csDelegate11 = translator.GetDelegate<TestDelegate>(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_csDelegate12(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    LuaTestObj.csDelegate12 = translator.GetDelegate<TestDelegate>(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_csDelegate13(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			    LuaTestObj.csDelegate13 = translator.GetDelegate<TestDelegate>(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_initNumber(RealStatePtr L)
        {
            
            try {
			    LuaTestObj.initNumber = LuaAPI.xlua_tointeger(L, 1);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int set_ptr(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            try {
			
                LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.ptr = LuaAPI.lua_touserdata(L, 2);
            
            } catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
            return 0;
        }
        
		
		
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int TestEvent1(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			int __gen_param_count = LuaAPI.lua_gettop(L);
			LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
            try {
                TestEvtHandler1 __gen_delegate = translator.GetDelegate<TestEvtHandler1>(L, 3);
                if (__gen_delegate == null) {
                    return LuaAPI.luaL_error(L, "#3 need TestEvtHandler1!");
                }
				
				if (__gen_param_count == 3)
				{
					System.IntPtr strlen;

					System.IntPtr str = LuaAPI.lua_tolstring(L, 2, out strlen);

					if (str != System.IntPtr.Zero && strlen.ToInt32() == 1)
					{
						byte op = System.Runtime.InteropServices.Marshal.ReadByte(str);
					
						
						if (op == (byte)'+') {
							__cl_gen_to_be_invoked.TestEvent1 += __gen_delegate;
							return 0;
						} 
						
						
						if (op == (byte)'-') {
							__cl_gen_to_be_invoked.TestEvent1 -= __gen_delegate;
							return 0;
						} 
						
					}
				}
			} catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
			LuaAPI.luaL_error(L, "invalid arguments to LuaTestObj.TestEvent1!");
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int TestEvent2(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			int __gen_param_count = LuaAPI.lua_gettop(L);
			LuaTestObj __cl_gen_to_be_invoked = (LuaTestObj)translator.FastGetCSObj(L, 1);
            try {
                TestEvtHandler2 __gen_delegate = translator.GetDelegate<TestEvtHandler2>(L, 3);
                if (__gen_delegate == null) {
                    return LuaAPI.luaL_error(L, "#3 need TestEvtHandler2!");
                }
				
				if (__gen_param_count == 3)
				{
					System.IntPtr strlen;

					System.IntPtr str = LuaAPI.lua_tolstring(L, 2, out strlen);

					if (str != System.IntPtr.Zero && strlen.ToInt32() == 1)
					{
						byte op = System.Runtime.InteropServices.Marshal.ReadByte(str);
					
						
						if (op == (byte)'+') {
							__cl_gen_to_be_invoked.TestEvent2 += __gen_delegate;
							return 0;
						} 
						
						
						if (op == (byte)'-') {
							__cl_gen_to_be_invoked.TestEvent2 -= __gen_delegate;
							return 0;
						} 
						
					}
				}
			} catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
			LuaAPI.luaL_error(L, "invalid arguments to LuaTestObj.TestEvent2!");
            return 0;
        }
        
		
		
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int TestStaticEvent1(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			int __gen_param_count = LuaAPI.lua_gettop(L);
            try {
                TestEvtHandler1 __gen_delegate = translator.GetDelegate<TestEvtHandler1>(L, 2);
                if (__gen_delegate == null) {
                    return LuaAPI.luaL_error(L, "#2 need TestEvtHandler1!");
                }
                
				
				if (__gen_param_count == 2 && LuaAPI.lua_tostring(L, 1) == "+") {
					LuaTestObj.TestStaticEvent1 += __gen_delegate;
					return 0;
				} 
				
				
				if (__gen_param_count == 2 && LuaAPI.lua_tostring(L, 1) == "-") {
					LuaTestObj.TestStaticEvent1 -= __gen_delegate;
					return 0;
				} 
				
			} catch(System.Exception __gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
            }
			return LuaAPI.luaL_error(L, "invalid arguments to LuaTestObj.TestStaticEvent1!");
        }
        
    }
}
